cx.compilation.tests.push(dst.clone());
} else if target.is_bin() {
cx.compilation.binaries.push(dst.clone());
- } else if target.is_lib() && target.get_profile().is_compile() {
+ } else if target.is_lib() {
let pkgid = pkg.get_package_id().clone();
cx.compilation.libraries.find_or_insert(pkgid, Vec::new())
.push(root.join(filename));
pub fn foo() { dep1::dep() }
");
- let root = project.url();
- let git_root = git_project.url();
-
assert_that(project.cargo_process("cargo-build"),
execs().with_stderr("").with_status(0));
})
name = "syntax"
version = "0.0.1"
authors = []
-
- [[lib]]
- name = "syntax"
- test = false
"#)
.file("src/lib.rs", "
+ /// ```
+ /// syntax::foo();
+ /// ```
pub fn foo() {}
+
+ #[test]
+ fn foo_test() {}
")
.file("tests/test.rs", "
extern crate syntax;
execs().with_status(0)
.with_stdout(format!("\
{compiling} syntax v0.0.1 ({dir})
+{running} target[..]test[..]syntax-[..]
+
+running 1 test
+test foo_test ... ok
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured\n\n\
+
{running} target[..]test[..]test-[..]
running 1 test
test test ... ok
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured\n\n\
+
+{doctest} syntax
+
+running 1 test
+test foo_0 ... ok
+
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured\n\n\
",
compiling = COMPILING, running = RUNNING,
- dir = p.url()).as_slice()));
+ doctest = DOCTEST, dir = p.url()).as_slice()));
})
test!(lib_with_standard_name2 {